package com.shinhye.wisdompeking.utils;

import android.content.Context;
import android.content.SharedPreferences;

public class SharedUtils {
	private static final String CONFIG = "config";
	private static SharedPreferences sp;

	public static void putString(Context context, String key, String value) {
		if(sp == null)
			sp = context.getSharedPreferences(CONFIG, Context.MODE_PRIVATE);
		sp.edit().putString(key, value).commit();
	}
	
	public static String getString(Context context, String key, String defValue) {
		if(sp == null)
			sp = context.getSharedPreferences(CONFIG, Context.MODE_PRIVATE);
		return sp.getString(key, defValue);
	}
}
